﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestTable.aspx.cs" Inherits="TestJS_TestTable" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function showMsg() {
            var oTb = document.getElementById("testTable");
            var oTDs = oTb.getElementsByTagName("td");
            for (var i = 0; i < oTDs.length; i++) {
                alert(oTDs[i].innerText);
            }
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table border="1" cellpadding="0" cellspacing="0" id="testTable">
            <tr>
                <td rowspan="2">1-1</td>
                <td>1-2</td>
                <td>1-3</td>
            </tr>
            <tr>
                <td>2-2</td>
                <td>2-3</td>
            </tr>
        </table>
    </div>
    <input type="button" onclick="showMsg()" value="查看table" />
    </form>
</body>
</html>
